﻿using Natural.Attributes;
using Natural.Managers;
using Natural.Model;
using Natural.Providers;

namespace Natural.Decorators
{
    [Impl(Type = ImplType.Decorator,Name = "Invoker", Strategy = "Log", Version = 0, Priority = 0)]
    public class InvokerLogDecorator : IInvoker 
    {
        private IInvoker Decorated;
        public InvokerLogDecorator(IInvoker decorated)
        {
            Decorated = decorated;
        }
        public void Invoke(InvokeContext context)
        {
            Decorated.Invoke(context);
            Logger.Log(context);
        }
    }   
}
